# 练习 2 : 使用 for in 和 while 循环 二种方式 遍历列表["hello","python","itcast","world"]

my_list = ["hello","python","itcast","world"]

for obj in my_list:
    print(obj)

print("*" * 50)

for i, obj in enumerate(my_list):
    print("%d->%s" % (i, obj))

print("*" * 50)

i = 0
while i < len(my_list):
    print(my_list[i])
    i += 1
